package com.ptu.spzx.manager.controller;


import com.ptu.spzx.manager.service.SysUserService;
import com.ptu.spzx.model.dto.system.AssginDeptDto;
import com.ptu.spzx.model.dto.system.AssginRoleDto;
import com.ptu.spzx.model.vo.common.Result;
import com.ptu.spzx.model.vo.common.ResultCodeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/ac/system/sysDeptUser")
public class SysDeptUserController {
    @Autowired
    private SysUserService sysUserService;
    //用户分配部门
    //保持分配数据
    @PostMapping("/doAssign")
    public Result doAssign(@RequestBody AssginDeptDto assginDeptDto){
        sysUserService.doAssignDept(assginDeptDto);
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }
}
